<script setup>
// 接收数据
const props = defineProps({
  weekOverviewData: {
    type: Object,
    default: function () {
      return {};
    },
  },
  dayOverviewData: {
    type: Object,
    default: function () {
      return {};
    },
  },
});
</script>

<template>
  <div class="middle_top">
    <div class="middle_top_list">
      <div class="list_title">平均达标率</div>
      <div class="list_num list_num1">
        <span class="counter-value">{{
          props.weekOverviewData.passing.toFixed(2)
        }}%</span>
      </div>
      <div class="today_list_font">
        今日达标率<span>{{ props.dayOverviewData.passing.toFixed(2) }}%</span>
      </div>
    </div>
    <div class="middle_top_list">
      <div class="list_title">总处理水量</div>
      <div class="list_num list_num2">
        <span class="counter-value">{{
          props.weekOverviewData.totalAmount.toFixed(2)
        }}</span>
      </div>
      <div class="today_list_font">
        今日处理水量<span>{{ props.dayOverviewData.totalAmount.toFixed(2) }}</span>
      </div>
    </div>
    <div class="middle_top_list">
      <div class="list_title">平均加药量</div>
      <div class="list_num list_num3">
        <span class="counter-value">{{
          props.weekOverviewData.dosage.toFixed(2)
        }}</span>
      </div>
      <div class="today_list_font">
        今日加药量<span>{{ props.dayOverviewData.dosage.toFixed(2) }}</span>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.middle_top {
  width: 100%;
  height: 100%;
}
.middle_top_list {
  float: left;
  width: 33.2%;
  height: 65%;
  margin-top: 5%;
  text-align: center;
  color: #4adefe;
}
.middle_top_list span {
  color: #f3db5c;
}
.list_title {
  font-size: 18px;
  margin-top: -15%;
}
.list_num {
  margin-top: 3%;
  font-size: 16px;
}
.list_num span {
  font-size: 30px;
}
.today_list_font {
  font-size: 14px;
  margin-top: 4%;
}
.middle_top_list:nth-of-type(2) {
  border-left: 1px solid #4e72b0;
  border-right: 1px solid #4e72b0;
}
.middle_bottom {
  width: 100%;
  height: 75%;
  margin-top: 9%;
  background: transparent;
}
</style>